<template>
  <div class="hello">
    <h2>Hello</h2>
    <!-- <button @click="showLoading">显示loading123</button> -->
    <!-- <button @click='showToast'>显示Toast</button> -->
    <!-- <Loading v-model="isShow"> -->
      <!-- <img src="/static/img/830.gif" slot="icon-loading"/> -->
    </Loading>
  </div>
</template>

<script>
import Vue from 'vue'
export default {
  name: 'hello',
  data () {
    return {
      isShow: false,
    }
  },
  created () {
    // this.$toast('想要显示的消息')
    console.log('组件外created')
  },
  methods: {
    showLoading () {
      // this.$loading();
      // Vue.loading();
      this.isShow = !this.isShow
      setTimeout(()=>{
        this.isShow = !this.isShow;
      }, 3*1000)
    },
    showToast () {
      this.$toast({
        message: 'hellow',
        type: 'bottom',
        duration: 5000
      });
      // this.$toast()
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>
